Optimal. Leaf size=45 \[ -\frac {i}{3 x^3}-\frac {2 i e^{-2 i a}}{x}+2 i e^{-3 i a} \tanh ^{-1}\left (e^{-i a} x\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.03, antiderivative size = 45, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 13, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {4592, 456, 464,
331, 213} \begin {gather*} -\frac {2 i e^{-2 i a}}{x}+2 i e^{-3 i a} \tanh ^{-1}\left (e^{-i a} x\right )-\frac {i}{3 x^3} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 213
Rule 331
Rule 456
Rule 464
Rule 4592
Rubi steps
\begin {align*} \int \frac {\cot (a+i \log (x))}{x^4} \, dx &=\int \frac {\cot (a+i \log (x))}{x^4} \, dx\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.02, size = 70, normalized size = 1.56 \begin {gather*} -\frac {i}{3 x^3}-\frac {2 i \cos (2 a)}{x}+2 i \tanh ^{-1}(x \cos (a)-i x \sin (a)) \cos (3 a)-\frac {2 \sin (2 a)}{x}+2 \tanh ^{-1}(x \cos (a)-i x \sin (a)) \sin (3 a) \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.06, size = 35, normalized size = 0.78
method | result | size |
risch | \(-\frac {i}{3 x^{3}}-\frac {2 i {\mathrm e}^{-2 i a}}{x}+2 i \arctanh \left (x \,{\mathrm e}^{-i a}\right ) {\mathrm e}^{-3 i a}\) | \(35\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [B] Both result and optimal contain complex but leaf count of result is larger than
twice the leaf count of optimal. 139 vs. \(2 (28) = 56\).
time = 0.28, size = 139, normalized size = 3.09 \begin {gather*} -\frac {3 \, x^{3} {\left (-i \, \cos \left (3 \, a\right ) - \sin \left (3 \, a\right )\right )} \log \left (x^{2} + 2 \, x \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (a\right )^{2}\right ) + 3 \, x^{3} {\left (i \, \cos \left (3 \, a\right ) + \sin \left (3 \, a\right )\right )} \log \left (x^{2} - 2 \, x \cos \left (a\right ) + \cos \left (a\right )^{2} + \sin \left (a\right )^{2}\right ) + 6 \, {\left ({\left (\cos \left (3 \, a\right ) - i \, \sin \left (3 \, a\right )\right )} \arctan \left (\sin \left (a\right ), x + \cos \left (a\right )\right ) + {\left (\cos \left (3 \, a\right ) - i \, \sin \left (3 \, a\right )\right )} \arctan \left (\sin \left (a\right ), x - \cos \left (a\right )\right )\right )} x^{3} + 12 \, x^{2} {\left (i \, \cos \left (2 \, a\right ) + \sin \left (2 \, a\right )\right )} + 2 i}{6 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 2.25, size = 55, normalized size = 1.22 \begin {gather*} \frac {{\left (3 i \, x^{3} e^{\left (-i \, a\right )} \log \left (x + e^{\left (i \, a\right )}\right ) - 3 i \, x^{3} e^{\left (-i \, a\right )} \log \left (x - e^{\left (i \, a\right )}\right ) - 6 i \, x^{2} - i \, e^{\left (2 i \, a\right )}\right )} e^{\left (-2 i \, a\right )}}{3 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.17, size = 54, normalized size = 1.20 \begin {gather*} - \left (i \log {\left (x - e^{i a} \right )} - i \log {\left (x + e^{i a} \right )}\right ) e^{- 3 i a} - \frac {\left (6 i x^{2} + i e^{2 i a}\right ) e^{- 2 i a}}{3 x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.45, size = 49, normalized size = 1.09 \begin {gather*} i \, e^{\left (-3 i \, a\right )} \log \left (i \, x + i \, e^{\left (i \, a\right )}\right ) - i \, e^{\left (-3 i \, a\right )} \log \left (-i \, x + i \, e^{\left (i \, a\right )}\right ) - \frac {2 i \, e^{\left (-2 i \, a\right )}}{x} - \frac {i}{3 \, x^{3}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 2.21, size = 44, normalized size = 0.98 \begin {gather*} \frac {\mathrm {atan}\left (\frac {x}{\sqrt {-{\mathrm {e}}^{a\,2{}\mathrm {i}}}}\right )\,2{}\mathrm {i}}{{\left (-{\mathrm {e}}^{a\,2{}\mathrm {i}}\right )}^{3/2}}-\frac {2{}\mathrm {i}\,{\mathrm {e}}^{-a\,2{}\mathrm {i}}\,x^2+\frac {1}{3}{}\mathrm {i}}{x^3} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________